<?php

namespace Sharks\Core\LifeCycle;

use Sharks\Core\AppContext;
use Sharks\Core\Http\Request;
use Sharks\Core\Http\Response;
use Sharks\Core\Module;

/**
 * Module执行事件
 */
class ModuleLinePiple {

    public function line(Request $request, Response $response) {
        foreach (Module::all() as $name => $module) {
            $module->loader()->start($request);
        }
    }

    public function lined(Request $request, Response $response) {
        foreach (Module::all() as $name => $module) {
            $module->loader()->end($response);
        }
    }
}